package com.leyou.user;

import com.leyou.auth.annotation.EnableJwtVerification;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/*
* - 一个是当前项目扫描包
- 一个是刚刚定义的advice统一异常的扫描包
*/
@EnableFeignClients(basePackages = "com.leyou.auth.client")
@SpringBootApplication(scanBasePackages = {"com.leyou.user","com.leyou.common.advice"})
@MapperScan("com.leyou.user.mapper")

//用户拦截器开关
// 在这个EnableJwtVerification类里面动态开关 用的时候加高级  加这个注解就是使MvcConfiguration注入IOC  生成主键
//因此任何项目只要引入了@EnableJwtVerification就可以使得MvcConfiguration生效，从而使拦截器生效。
@EnableJwtVerification
public class LyUserApplication {
    public static void main(String[] args) {
        SpringApplication.run(LyUserApplication.class, args);
    }
}
